package work.learn.base;

class OutCls {
    private final String outerVariable = "I am outerVariable";

    public class Stream {
        void push(String in) {
            System.out.println("outerVariable = " + outerVariable);
            System.out.printf("push %s", in);
        }
    }
}

public class Inner {
    // 类中有一个类，则为内部类

    public static void main(String[] args) {
        // 静态的无法调用非静态的
        // new Stream();

        OutCls out = new OutCls();
        OutCls.Stream inner = out.new Stream();
        inner.push("inner");
    }
}
